import unittest
import rawgua.script as sp


class TestScriptMethods(unittest.TestCase):

    def test_to_lines(self):
        self.assertEqual(sp.to_lines("1\n2"), ["1", "2"], "分割脚本失败")
        
    def test_new_statement(self):
        sm = sp.Statement("@bg roof.png 1.0")
        self.assertEqual(sm.cmd, "@bg")
        self.assertEqual(sm.params, ["roof.png", "1.0"])



if __name__ == '__main__':
    unittest.main()